import { createRouter, createWebHistory } from 'vue-router'
import controlView from '@/views/controlView/index.vue'
import Layout from '@/layout/index.vue'
import Sub1 from '@/views/sub1/index.vue'
import Sub2 from '@/views/sub2/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Sub1,
      // redirect: '/controlView'
    },
    {
      path: '/sub1/:page*',
      name: 'sub1',
      component: Sub1,
    },
    {
      path: '/sub2/:page*',
      name: 'sub2',
      component: Sub2,
    },
    // {
    //   path: '/',
    //   name: 'controlView',
    //   component: controlView
    // }
  ]
})

export default router
